// 期初往来账款
const {DataTypes, db } = require("../db");
db.define('initMoney', {
id: {type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true,comment:'表自增ID'},
tenantId:{type: DataTypes.INTEGER,comment:'租户ID'}, 
buId:{type: DataTypes.INTEGER,comment:'客户'}, 
ys:{type: DataTypes.DECIMAL(20, 2),comment:'应收'}, 
yf:{type: DataTypes.DECIMAL(20, 2),comment:'应付'}, 
createdAt:{type: DataTypes.STRING(20),comment:'创建时间'}, 
updatedAt:{type: DataTypes.STRING(20),comment:''}, 
cby:{type: DataTypes.INTEGER,comment:''}, 
ctime:{type: DataTypes.STRING(20),comment:''}, 
uby:{type: DataTypes.INTEGER,comment:''}, 
utime:{type: DataTypes.STRING(20),comment:''}, 

}, {
    tableName: 'init_money',
    timestamps: false,
    comment: '期初往来账款',
    indexes: [
        {name:'已存在相同客户', unique: true, fields:['tenantId', 'buId']}
    ]
});